home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
system
/
switchar.zip
/
SWITCHAR.DOC
< prev
Wrap
Text File
|
1988-07-10
|
1KB
|
27 lines
There is an undocumented (by IBM and Microsoft) function in MSDOS,
which allows the use of "/" in pathnames rather than "\". MSDOS
maintains a "switch character" which is used to introduce options
on some, but not all MSDOS commands. The default is "/". If the
switch character is reset to something else, say "-", then "/" may
be used in pathnames. Those commands which use the switch character
will then recognize options introduced with the new switch character
(e.g. DIR -W).
The switch character is set as follows: (Thanks to Bob Jack, et. al.
and their interrupt list for the following information)
To find the current setting of the switch character, do an INT 21
with AH = 37H and AL = 0. The switch character is returned in DL.
To set the switch character, do an INT 21 with AH = 37H, AL = 1, and
DL = new switch character. The new switch character is returned in DL.
SWITCHAR.C is a Turbo C program which will set the switch character to
the first character of the first argument, if an argument is specified.
Otherwise, it displays the current setting of the switch character.
This program is not portable since it uses the Turbo C interface to MSDOS,
but it can't be too hard to port to other C compilers, since it's fewer
than 25 lines long.
SWITCHAR.COM is a compilation of switchar.c.